<layout name="Qingtaoke/default" />
<div class="col-md-offset-1 col-md-10">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h5>商品列表获取 API</h5>
        </div>
        <?php if($msg['code'] == 200):?>
        <div id="myAlert" class="alert alert-success">
            <a href="#" class="close" data-dismiss="alert">&times;</a>
            <strong>成功！</strong>共采集 <em>{$msg['p'] * $msg['thiscount']}</em> 条数据,成功添加 <em>{$msg['p'] * $msg['totalcoll']} 条</em>
        </div>
        <?php endif;?>
        <div class="panel-body">
            <form action="{:U('Qingtaoke/listGoods')}" method="post">
                <div class="form-group">
                    <label for="apikey">API KEY:</label>
                    <input type="text" name="apikey" class="form-control" value="<?php echo $apikey?>" disabled>
                </div>
                <div class="form-group">
                    <label for="v">版本:</label>
                    <input type="text" name="v" class="form-control" value="<?php echo $v?>" disabled>
                </div>
                <div class="form-group">
                    <label for="page">获取页数:</label><em>分页获取数据 默认1 最多获取到600页（每页100条）</em>
                    <input type="text" name="page" class="form-control" value="1">
                </div>
                <div class="form-group">
                    <label for="page_size">每页显示条数:</label> <em>	每页显示多少条数据 , 可选值 [100 , 200] , 默认100</em>
                    <select name="page_size" class="form-control">
                        <option value="100" selected>100</option>
                        <option value="200">200</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="sort"> 排序方式：</label>
                    <select class="form-control" name="sort">
                        <option value="1" selected>人气排序从高到低（默认）</option>
                        <option value="2">最新排序从高到低</option>
                        <option value="3">销量排序从高到低</option>
                        <option value="4">价格排序从低到高</option>
                        <option value="5">佣金排序从高到低</option>
                        <option value="7">价格排序从高到低</option>
                        <option value="8">人气排序从低到高</option>
                        <option value="9">最新排序从低到高</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="cat">商品分类 ：</label>
                    <select class="form-control" name="cat">
                        <option value="0" selected>全部（默认）</option>
                        <option value="2">母婴</option>
                        <option value="3">美妆</option>
                        <option value="4">居家</option>
                        <option value="5">鞋包配饰</option>
                        <option value="6">美食</option>
                        <option value="7">文体</option>
                        <option value="8">家电数码</option>
                        <option value="9">其他</option>
                        <option value="10">女装</option>
                        <option value="11">内衣</option>
                        <option value="12">男装</option>
                    </select>
                </div>
                <div class="form-group">
                    <label for="min_price">券后价区间（最小值）:</label>
                    <input type="text" name="min_price" class="form-control" value="0">
                </div>
                <div class="form-group">
                    <label for="max_price">券后价区间（最大值）:</label>
                    <input type="text" name="max_price" class="form-control" value="0">
                </div>
                <div class="form-group">
                    <label for="new">是否取今日新品:</label>
                    <select name="new" class="form-control">
                        <option value="0" selected>全部</option>
                        <option value="1">今日新品</option>
                    </select>
                </div>
                
                <div class="form-group">
                    <label for="is_ju">是否取聚划算商品:</label>
                    <select name="is_ju" class="form-control">
                        <option value="0" selected>全部</option>
                        <option value="1">取聚划算</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="is_tqg">是否取淘抢购商品:</label>
                    <select name="is_tqg" class="form-control">
                        <option value="0" selected>全部</option>
                        <option value="1">取淘抢购</option>
                    </select>
                </div>

                <div class="form-group">
                    <label for="is_ali">是否取阿里券商品:</label>
                    <select name="is_ali" class="form-control">
                        <option value="0" selected>否</option>
                        <option value="1">是</option>
                    </select>
                </div>

                <button type="submit" class="btn btn-primary">开始采集</button>
            </form>
        </div>
    </div>
</div>
